EXPLORER SCAN ASSISTANT (beta 6b)
------------------------------------------------------------------------------
Release Date: March 24, 2025

NOTE: Due to the new Elite Dangerous 3.3+ updates after December 2018 this
tool doesn't work as usual anymore, it has NOT been tested with the new version
and can therefore behave strangely! So use it at your own risk!

------------------------------------------------------------------------------

This is a tiny tool for all explorers which adds a nice voice assistant. It
monitors the game journal folder of the game "Elite: Dangerous" (*) in the
background (adjustable interval) and plays a detailed voice or FX sound when
a Detail scan has been finished.

If a precious planet has been found, additional voice sounds are played, too.
Precious Planets are: Earthlike, Waterworld, Ammonia World, Metal Rich. If
the planet is an Earthlike or a Terraformable Waterworld or High Metal Content
a notice is played that a *very* precious planet has been found.

The "Scan" button scans the whole Journal folder for previously logged Detail
Scans and displays the results per Class in the Statistics tab and adds all
rewards together. The results are written to a local SQlite database file for
further analysis.

Other buttons are available to switch additional voice sounds on or off. There
is a second, limited Soundset available with Sound FX only and the application
has a compact mode which - in combination with the Always on top feature -
allows to place the window on top of the game window when the game is running
in windowed or borderless mode.



Technical notice
------------------------------------------------------------------------------
This application is written in Blitzmax and has been compiled to run in a
Windows environment. It is a 32bit application using DirectX 9. It needs write
access to the folder where the executable file is located to be able to write
the config file. It never changes any Journal files from Elite Dangerous nor
other files of the system (see the source code if you don't believe this). This
version has been tested with Elite Dangerous: Horizons Version 3.1.2. It may be
incompatible with future versions of Elite Dangerous if the JSON Journal format
changes. Use this application at your own risk!

The Overlay / Always on Top mode only works if you set the graphics mode in
Elite Dangerous to "Borderless Window" / "Window", Fullscreen is NOT supported!

A known bug is that sometimes the window content of this tool isn't updated
anymore and shows a blank page - close and restart the tool to "fix" it - I'm
still investigating this issue.



Config file description
------------------------------------------------------------------------------
The config file is managed by the application and should be left alone. You
should only change the values if you know what you do here:

Scan Notice=1               ' on (1) or off (0)
Scoop Notice=1              ' on (1) or off (0)
Warnings=1                  ' on (1) or off (0)
Star Details=1              ' on (1) or off (0)
Planet Details=1            ' on (1) or off (0)
Precious Details=1          ' on (1) or off (0)
Cash Sounds=1               ' on (1) or off (0)
Blip Sounds=1               ' on (1) or off (0)
Horn Sounds=1               ' on (1) or off (0)
Soundset=1                  ' on (1) or off (0)
Window Mode=0               ' 0=Full Mode 1=Compact Mode
Tab=0                       ' 0-3 = current selected Tab in the application
SaveSettings=1              ' on (1) or off (0)
Scan Range=4                ' 0=All, 1=Custom, 2-8 like in the Menu
TimeCorrection=-2           ' server/log datetime correction (-2 = Germany)
MonitorInterval=500         ' time in ms how often the log is rescanned
PingInterval=8000           ' time in ms frequency of the "still alive" blip
Volume=50                   ' general volume 0-100 (in %)
Always on Top=0             ' on (1) or off (0)
Debug Mode=1                ' excessive (1) or less (0) debug information
CustomStart=18.03.2025      ' custom scan start date (DD.MM.YYYY) at 00:00am
CustomEnd=18.03.2025        ' custom scan end date (DD.MM.YYYY) at 12:00pm

The other categories store the rewards for a specific objects in credits. You
can change these values if Frontier ever decides to change the exploration
rewards for single objects or to values which meet your own experience.

These values are taken from this Wiki Table and only an approximation:
https://elite-dangerous.fandom.com/wiki/Explorer

They may be slightly incorrect but will give you an idea how many credits you
can expect at your next Universal Cartographers branch office visit. Rewards
of scans before the 3.3 Update will be way too high as no differentiation has
been implemented yet.

Notice: the values must be within a range of 1...10000000, if they are zero the
default value stored in the application will be used instead. Because of
changes in Update 3.3 the last scan (System completed) will not be announced,
so it is a good idea to manually check the Planet or the whole system for
precious planets if you won't miss a single one.

WARNING: changing the MonitorInterval can lead to a increased CPU usage and/or
prevents the application from responding. 100ms should be the lowest value.
Keep in mind that the function behind this value scans the whole Journal folder
and parses the newest file completely which can take some time.



Credits
------------------------------------------------------------------------------

- Voice TTS created and downloaded with a licensed account in "Acapela Box"
  using the great Voice of "Heather". These sound files are royalty free.
  https://acapela-box.com

- FontStruction "NovaMono" by "fontcollector" is licensed under a Creative
  Commons Attribution Non-commercial No Derivatives license
  https://fontstruct.com/fontstructions/show/196231
  http://creativecommons.org/licenses/by-nc-nd/3.0/
  
- Icons used from Famfamfam, Fatcow and Fugue, some were modified to fit size
  Famfamfam:  http://www.famfamfam.com
              http://creativecommons.org/licenses/by/2.5/
  Fatcow:     http://www.fatcow.com
              https://creativecommons.org/licenses/by/3.0/us/
  Fugue:      http://p.yusukekamiyamane.com
              https://creativecommons.org/licenses/by/3.0/  
  
- this tool is written in the great Blitzmax Language using MAXGUI, OpenB3D
  and some of Brucey's modules (Regular expressions, SQlite) for x86 (32bit)
  https://nitrologic.itch.io/blitzmax
  https://github.com/blitz-research/blitzmax
  https://sourceforge.net/projects/maxgui/
  https://github.com/markcwm/openb3d.mod
  https://github.com/maxmods

* Elite: Dangerous © 2012, 2013 Frontier Developments plc.
  http://www.elitedangerous.com 
  All rights reserved.



Contact
------------------------------------------------------------------------------
You can contact me at hansstoffeln at googlemail dot com or in Discord as
"metatiger"



License Agreement
------------------------------------------------------------------------------
Copyright (c) 2017-2025, Christian Hart. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

- Redistributions of source code must retain the above copyright notice,
  this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions, this Readme.txt file and the following disclaimer
  in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION). HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.



Changelog
------------------------------------------------------------------------------

March 24, 2025: Beta 6b
- fixed SQL statement function for analysis
- fixed double scan error, now scans and analyzes result in a single run only

March 23, 2025: Beta 6a
- fixed Precious Planets statistics bar display (now also LONG instead of INT)
- fixed a wrong SQL Statement when counting bodies, but still not 100% reliable
- added SQlite Database import, you can now import an exported ESA Database
- added a 48 hour Time Range
- added Alt-P Hotkey to instantly kill the EliteDangerous game process


March 18, 2025: Beta 6
- fixed Credits display, now uses LONG instead of INT for billionaires XD
- fixed a problem with the Config, saved settings did not work after restart
- added 6 hour Time Range
- added a Config setting that the current open tab gets saved too
- added Carrier Jump simple System Scans, too

January 21, 2019: Beta 5a hotfix
- rewrote the source that the media files are not included in the EXE anymore
  now you can change all media as long as the filenames are the same (like
  your own OGG voice files - use Audacity to convert media files to OGG)
- added feature to choose your own voiceover folder. make sure that ALL 56
  OGG files exists or the tool WILL CRASH! The filenames MUST be EXACT like
  in the voice folder or it won't work!
- added two german voices, to use them change in the INI the line VoiceFolder to
  VoiceFolder=voice
  or VoiceFolder=voice.malegerman
  or VoiceFolder=femalegerman
  or your own folder if you want to create your custom voice.

July 16, 2017: Beta 5 hotfix
- fixed a problem with the PingInterval/MonitorInterval variables from the
  config not used by the application
- fixed a problem with the Timecorrection variables from the config not
  used by the application (times could be still incorrect though)
- showing UTC/local time in the welcome screen to check if the time
  correction is applied properly or needs to be changed in the INI by the
  user first (only noticable if using the 1h scan analysis range)

July 16, 2017: Beta 5 preview
- a lot of smaller and greater bugfixes I can't remember :-)
- hopefully fixed the silent crashes propably caused by a memory leak
- added a "still alive" ping to hear if the application is still active
- added a server datetime correction to scan times between 0:00 and 02:00am
  correct (especially in Germany as the logfiles contain only the UK times)
- added some speed and memory usage improvements, the application shouldn't
  eat more memory than it really needs now
- added the reward values to the config file that they can be changed by the
  user independantly from the application
- redesigned the full/compact background images to have a better contrast
- reduced the font size for a better readability
- releasing to public (first light)

October 25, 2017: Beta 4 preview
- added a "Always on Top" feature for use with the borderless mode in
  Elite Dangerous, Window can stay on top of the game screen now
- added detailed Scan statistics window
- added Screenshot function for statistics window
- added CMDR name, credits, ship type, ship name from LATEST journal logfile
- added SQlite database output from Scan button results including export,
  use "DB Browser for SQLite" to view the contents of the .db file or
  export the results from this tool to CSV/Excel
  http://sqlitebrowser.org
- added a cooler background picture, adjusted the GUI to it
- switched font from "Zodiac Narrow" to "NovaMono", added black borders to
  view the results with a better contrast to the background image
- added menu icons
- Settings are now saved automatically when the application exits
- Quick Journal scan now calculates UNIX timestamps to get more exact
  results within two timestamps
- smaller bugfixes
- added some new bugs :)

October 8, 2017: Beta 3
- implemented INI File Handling, Settings can be saved now (and gets loaded
  automatically on startup)
- added a Compact Mode Feature to use a smaller window (without buttons)
- Cash/Precious/Horn Sounds switchable
- Scan Ranges 1 hour to all (before: 1 day to all)
- much faster Scanning of Journal
- smaller bugfixes

October 7, 2017: Beta 2
- added more buttons :)

October 7, 2017: Beta 1
- added buttons
- added a pulldown menu with time range selection
- added a volume slider
- added Debuglog
- new Interface design

October 6, 2017: Beta 1
- added a simple Journal scanner with statistic output

October 3, 2017: First Techdemo
- only capable of parsing the last scan and playing a sound

October 1, 2017: First Idea to get rid of my Excel calculations :)